home *** CD-ROM | disk | FTP | other *** search
/ Practical Web Pages 2004 September / PracticalWebPages-WPG13-09-2004-Coverdisc.iso / pc / Software / Toolkit / Sothink SWF Quicker 1.5 / data1.cab / Public_Files / Effects / ActionScript / Combination / Combination.sqe < prev    next >
Encoding:
Text File  |  2004-06-14  |  2.2 KB  |  86 lines

  1. ========== Description Part Begin ==========
  2. name = "Combination";
  3. description = "Two groups of characters are moving face to face and combined into one at last.";
  4. version = "1.00";
  5. bin = "Combination.bin";
  6. ========== Description Part End ==========
  7.  
  8. ========== Parameter Part Begin ==========
  9. $nCharacterCount(EDIT,INT,1,1 10000,"Total Characters ","The total characters using the special effect. The value is defined by the selected characters in the movie, but can not be changed in the property box.");
  10. $nFrameCount(EDIT,INT,3,3 3,"Total Frames","It indicates the total frames of actions. The total frames of the effect is probably more than it.");
  11. $nAlphaChangeSpeed(EDIT,INT,3,1 100,"Fading Speed","The speed of character fading.");
  12. $nMoveSpeed(EDIT,INT,2,1 100,"Speed","The moving speed of characters.");
  13. $nSetSpace(EDIT,INT,120,10 1000,"Space","The distance between the two groups of characters.");
  14.  
  15. ========== Parameter Part End ==========
  16.  
  17. ========== Function Part Begin ==========
  18. nFrameCount = 10;
  19. nCharacterCount = 4;
  20. nMoveSpeed = 5;
  21. nAlphaChangeSpeed = 2;
  22. nSetSpace = 200;
  23.  
  24.  
  25.  
  26.  
  27. nSpace = nSetSpace/2;
  28. nBakCharacter_x = new Array(nCharacterCount);
  29.  
  30. for(i = nCharacterCount + 1;i <= nCharacterCount * 2;i++)
  31. {
  32.     this["c" + (i - nCharacterCount)].duplicateMovieClip("c"+i, i);
  33.     this["c" + i]._x += nSpace;
  34.     this["c" + i]._alpha = 10;
  35. }
  36.  
  37. for (i = 1; i <= nCharacterCount; i++)
  38. {
  39.     nBakCharacter_x[i -1] =     this["c" + i]._x;
  40.     this["c" + i]._x -= nSpace;
  41.     this["c" + i]._alpha = 10;
  42. }
  43.  
  44.  
  45.  
  46.     
  47.     
  48. function fun()
  49. {
  50.     
  51.     for (i = 1; i <= nCharacterCount; i++)
  52.     {
  53.         this["c" + i]._x += nMoveSpeed;
  54.         this["c" + i]._alpha += nAlphaChangeSpeed;
  55.     }
  56.  
  57.     
  58.     for(i = nCharacterCount + 1;i <= nCharacterCount * 2;i++)
  59.     {
  60.         this["c" + i]._x -= nMoveSpeed;
  61.         this["c" + i]._alpha += nAlphaChangeSpeed;
  62.     }
  63.  
  64.     nSpace -= nMoveSpeed;
  65.     if(nSpace < 0)
  66.     {
  67.         for (i = 1; i <= nCharacterCount; i++)
  68.         {
  69.             this["c" + i]._x = nBakCharacter_x[i -1] ;
  70.         }
  71.         gotoAndPlay(1);
  72.     }
  73. }
  74.  
  75. function again()
  76. {
  77.     gotoAndPlay(2);
  78. }
  79.  
  80. ========== Function Part End ==========
  81.  
  82. ========== Frame Part Begin ==========
  83. $frame(fun,1,-1,"fun");
  84. $frame(fun,2,-1,"fun");
  85. $frame(again,3,-1,"again");
  86. ========== Frame Part End ==========